using System;
using System.Collections.Generic;
using System.Text;

namespace Coriander.Xmpp.Logging
{
    /// <summary>
    /// 
    /// </summary>
    public class OperationInfo
    {
        readonly String name;

        /// <summary>
        /// 
        /// </summary>
        public String Name
        {
            get { return name; }
        }

        /// <summary>
        /// ctor
        /// </summary>
        private OperationInfo() : this (null) {}

        /// <summary>
        /// ctor : String
        /// </summary>
        /// <param name="name"></param>
        public OperationInfo(String name) 
        {
            this.name = name;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="?"></param>
        /// <returns></returns>
        public static implicit operator String(OperationInfo operation)
        {
            return operation != null ? operation.Name : String.Empty;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static OperationInfo New(String name)
        {
            return new OperationInfo(name); 
        }
    }
}
